/*
 * @Author: deng da chao
 * @Date: 2022-05-24 09:12:10
 * @LastEditTime: 2023-10-25 13:56:55
 * @Description: 
 */
import http from '../../utils/http'


// 获取当前会员详细信息
const getMemberDetail = (data) => {
  return http.get('/member/sysMember/getMemberDetail', data)
}

// 获取转赠记录列表  /photo/api/v1/nft/transfer/log/list
const getSysMemberBalanceList = (data) => {
  return http.get('/nft/transfer/log/list', data)
}

// 修改会员头像、昵称、所用版本号
const putUpdateMemberDetail = (data) => {
  return http.put('/member/sysMember/updateMemberDetail', data)
}

// 刷新token
const getRefreshToken = (data) => {
  return http.post('/token/refresh', data)
}
// 校验用户是否注册
const getMobileRegister = (data) => {
  return http.get(`/member/sysMember/mobileRegister/${data.mobile}`, data)
}
// 校验用户是否已实名
const postSysMemberJudgeAuth = (data) => {
  return http.post('/member/sysMember/judgeAuth', data)
}
// 实名认证 需要照片
const postSysMemberAuthentication = (data) => {
  return http.post('/member/sysMember/authentication', data)
}

// NFT实名认证 不需要照片
const postSysMemberNftAuthentication = (data) => {
  return http.post('/member/sysMember/nftAuthentication', data)
}

// 验证是否有支付密码
const getHasPayPassword = (data) => {
  return http.get('/member/sysMember/getHasPayPassword', data)
}
// 验证支付密码
const getEqPayPassword = (data) => {
  return http.get('/member/sysMember/getEqPayPassword', data)
}

// 通过手机号/区块链地址查询用户信息
const getSysMemberBymobileOrEmail = (data) => {
  return http.get('/member/sysMember/getSysMemberBymobileOrEmail', data)
}

// 获取<我的余额>顶部信息/api/v1/member/sysMemberBalance/getSysMemberBalanceDetail
function getSysMemberBalanceDetail(data) {
  return http.get('/member/sysMemberBalance/getSysMemberBalanceDetail', data)
}

// 会有余额列表页/api/v1/member/sysMemberBalance/list
function sysMemberBalance(data) {
  return http.get('/member/sysMemberBalance/list', data)
}

// 提现前置接口
function getSysMemberBalanceCreateBefore(data) {
  return http.get('/member/sysMemberBalance/createBefore', data)
}

//发起提现
function postSysMemberBalanceCreate(data) {
  return http.post('/member/sysMemberBalance/create', data)
}

// 新增银行卡
function postSysMemberBindCreate(data) {
  return http.post('/member/sysMemberBind/create', data)
}

// 充值前置接口
function getBalanceRechargeBefore(data) {
  return http.get('/sys/sysRechargeAmount', data)
}

// 充值记录
function getRechargeLogs(data) {
  return http.get('/sys/sysRechargeAmount/rechargeLogs', data)
}

// 余额充值下单
function postBalanceRecharge(data) {
  return http.post('/order/orderMain/createRecharge', data)
}

// 查询充值订单是否支付成功
function getUpOrderStatusById(data) {
  return http.get(`/order/orderMain/rechargeResults/${data.orderId}`, data)
}

// 充值记录统计
function getRechargeLogStatistics(data) {
  return http.get(`/sys/sysRechargeAmount/rechargeLogStatistics`, data)
}


// 余额充值验证码确认
function postBalanceRechargeCode(data) {
  return http.post('/member/sysMemberBalance/balanceRechargeCode', data)
}

// 用户绑卡验证码输入
function postSysMemberBindCreateCode(data) {
  return http.post('/member/sysMemberBind/createCode', data)
}

// 用户绑银行卡列表
function getSysMemberBindList(data) {
  return http.get('/member/sysMemberBind/list', data)
}

// 删除用户绑卡
function deleteSysMemberBindDelete(data) {
  return http.delete('/member/sysMemberBind/delete', data)
}
// 获取会员修改密码时间
function memberGetUpdateTime(data) {
  return http.get('/member/sysMember/getUpdateTime', data)
}
// 发送验证码
function memberGetSms(data) {
  return http.get('/member/sysMember/getSms', data)
}
// 检查验证码是否相符
function memberCheckSms(data) {
  return http.get('/member/sysMember/checkSms', data)
}
// 绑定新手机号码
function bindNewPhone(data) {
  return http.get('/member/sysMember/bindNewPhone', data)
}

// 验证码/密码登录接口
function mgLogin(data) {
  return http.post('/token/mgLogin', data)
}


// 用户注册
function userRegistration(data) {
  return http.post('/token/userRegistration', data)
}

// 修改登录密码接口
function postUpdateLoginPassword(data) {
  return http.post('/member/sysMember/updateLoginPassword', data)
}

// 获取好友码（邀请我的人）
function getInvitationCode(data) {
  return http.get('/distribution/manGu/appDistributionInvite/invitationCode', data)
}

// 获取邀请码（自己的码）
function getMyInvitationCode(data) {
  return http.get('/distribution/manGu/appDistributionInvite/getMyInvitationCode', data)
}

//获取实名信息
function getRealNameInfo(data) {
  return http.get('/member/sysMember/realNameInfo', data)
}

// 获取礼物赠送记录
function getGiftRecord(data) {
  return http.get('/nft/getGiftRecord', data)
}
// 获取会员是否存在操作密码以及是否实名
function getjudgeAuthPass(data) {
  return http.get('/member/sysMember/getjudgeAuthPass', data)
}

// 查询用户头像列表信息
function getHeadImgsNew(data) {
  return http.get('/member/sysMember/headImgsNew', data)
}

// 解锁头像
function putUnlockHeadImg(data) {
  return http.put(`/member/sysMember/unlockHeadImg/${data.avatarId}`, data)
}

// 好友列表
function getChildUserList(data) {
  return http.get('/member/sysMember/childUserList', data)
}

// 修改昵称前置接口
function getUpdateNickNameFront(data) {
  return http.get('/member/sysMember/updateNickNameFront', data)
}

//获取钱包开通-续费功能
function yibaoWalletStatus(data) {
  return http.get('/member/sysMemberWallet/yibaoWalletStatus', data)
}


export default {
  getMemberDetail,
  getSysMemberBalanceList,
  putUpdateMemberDetail,
  postSysMemberJudgeAuth,
  postSysMemberAuthentication,
  postSysMemberNftAuthentication,
  getRefreshToken,
  getMobileRegister,
  getHasPayPassword,
  getEqPayPassword,
  getSysMemberBymobileOrEmail,
  getSysMemberBalanceDetail,
  sysMemberBalance,
  getSysMemberBalanceCreateBefore,
  postSysMemberBalanceCreate,
  postSysMemberBindCreate,
  getBalanceRechargeBefore,
  postSysMemberBindCreateCode,
  getSysMemberBindList,
  deleteSysMemberBindDelete,
  postBalanceRecharge,
  postBalanceRechargeCode,
  memberGetUpdateTime,
  memberGetSms,
  memberCheckSms,
  bindNewPhone,
  getRechargeLogs,
  getUpOrderStatusById,
  getRechargeLogStatistics,
  mgLogin,
  userRegistration,
  postUpdateLoginPassword,
  getInvitationCode,
  getMyInvitationCode,
  getRealNameInfo,
  getGiftRecord,
  getjudgeAuthPass,
  getHeadImgsNew,
  putUnlockHeadImg,
  getChildUserList,
  getUpdateNickNameFront,
  yibaoWalletStatus
}
